/** Created by CUIJA on 05-19-2017.*/
function navMenuService($http) {
  var svc = this;
  var urlBase = "/api/sysuser";
  svc.menus = [
      {
        state: 'verify',
        displayName: 'Verify'
      },
      {
        state: 'untreated',
        displayName: 'Verify List'
      }
  ];

  function addMenu(menu) {
      svc.menus.push(menu);
  }

  function getMenus() {
      return svc.menus;
  }

  function isLogin(){
      return $http.get(urlBase+"/isLogin");
  }

  function logout(){
      return $http.get(urlBase+"/logout");
  }

  return {
    getMenus: getMenus,
    addMenu: addMenu,
    logout: logout,
    isLogin : isLogin
  }
}

module.exports = navMenuService;